package com.hencoder;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import com.hencoder.hencoderpracticedraw1.MainActivity;
import com.hencoder.hencoderpracticedraw1.R;

public class NavActivity extends AppCompatActivity implements View.OnClickListener {
    Intent intent = new Intent();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_nav);
        findViewById(R.id.button).setOnClickListener(this);
        findViewById(R.id.button2).setOnClickListener(this);
        findViewById(R.id.button3).setOnClickListener(this);
        findViewById(R.id.button4).setOnClickListener(this);
        findViewById(R.id.button5).setOnClickListener(this);
        findViewById(R.id.button6).setOnClickListener(this);
        findViewById(R.id.button7).setOnClickListener(this);
        findViewById(R.id.button8).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.button:
                intent.setClass(this, MainActivity.class);
                break;
            case R.id.button2:
                intent.setClass(this, com.hencoder.hencoderpracticedraw2.MainActivity.class);
                break;
            case R.id.button3:
                intent.setClass(this, com.hencoder.hencoderpracticedraw2.MainActivity.class);
                break;
            case R.id.button4:
                intent.setClass(this, com.hencoder.hencoderpracticedraw2.MainActivity.class);
                break;
            case R.id.button5:
                intent.setClass(this, com.hencoder.hencoderpracticedraw2.MainActivity.class);
                break;
            case R.id.button6:
                intent.setClass(this, com.hencoder.hencoderpracticedraw2.MainActivity.class);
                break;
            case R.id.button7:
                intent.setClass(this, com.hencoder.hencoderpracticedraw2.MainActivity.class);
                break;
            case R.id.button8:
                intent.setClass(this, com.hencoder.hencoderpracticedraw2.MainActivity.class);
                break;
        }
        startActivity(intent);
    }
}
